﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>在文档中输出数据</title>
</head>
<body>
    <p>注意write()方法不会在每个语句后面新增一行：</p>
<pre>
<script>
    document.write("<h1>Hello World! </h1>");
    document.write("<h1>Have a nice day! </h1>");
</script>
</pre>
    <p>注意writeln()方法在每个语句后面新增一行：</p>
<pre>
<script>
    document.writeln("<h1>Hello World! </h1>");
    document.writeln("<h1>Have a nice day! </h1>");
</script>
</pre>
</body>
</html>
